﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.DAO;
using Com.CMS263.PO;
using Com.CMS263.Util;
namespace Com.CMS263.BLL
{
    public class AdminRoleBLL
    {
        AdminRoleDAO aud = new AdminRoleDAO();
        public void Add(AdminRole adminrole) 
        {
            aud.Add(adminrole);
        }
        public void DeleteUserById(int id)
        {
            aud.DeleteUserById(id);
        }
        public void ModifyAdminUser(AdminRole adminrole)
        {
            aud.ModifyAdminUser(adminrole);
        }
        public IList<AdminRole> GetAllAdminRole()
        {
            return aud.GetAllAdminRole();
        }
        /// <summary>
        /// 查询角色的权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string GetAdminPowerByID(int id)
        {
            return aud.GetAdminPowerByID(id);
        }

        public bool isExist(string userName)
        {
            return aud.isExist(userName);
        }

        public AdminRole GetAdminUserByID(int id)
        {
            return aud.GetAdminUserByID(id);
        }
    }
}
